package com.jdrx.sw.sewage.beans.dto.log;

import java.time.LocalDate;
import java.time.LocalDateTime;

import org.springframework.format.annotation.DateTimeFormat;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.jdrx.platform.commons.rest.beans.dto.PageBaseDTO;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

@ApiModel(value = "行为分析查询参数")
@Data
@EqualsAndHashCode(callSuper = false)
public class QueryLogDTO extends PageBaseDTO {
	private static final long serialVersionUID = 1136660289019221719L;
	
	@ApiModelProperty(hidden = true)
	private Long tenantId;

	@ApiModelProperty(value = "租户名称")
	private String tenant;

	@ApiModelProperty(value = "厂站名称")
	private String station;

	@ApiModelProperty(value = "人员名称")
	private String user;

	@ApiModelProperty(value = "事件名称")
	private String event;

	@ApiModelProperty(value = "终端名称")
	private String terminal;

	@ApiModelProperty(value = "开始日期")
	@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
	@DateTimeFormat(iso = DateTimeFormat.ISO.DATE, pattern = "yyyy-MM-dd")
	private LocalDate startDate;

	@ApiModelProperty(value = "结束日期")
	@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
	@DateTimeFormat(iso = DateTimeFormat.ISO.DATE, pattern = "yyyy-MM-dd")
	private LocalDate endDate;
	
	@ApiModelProperty(value = "隐含条件，用于startDate赋值", hidden = true)
	@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME, pattern = "yyyy-MM-dd HH:mm:ss")
	private LocalDateTime startDateTime;
	
	@ApiModelProperty(value = "隐含条件，用于endDate赋值", hidden = true)
	@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME, pattern = "yyyy-MM-dd HH:mm:ss")
	private LocalDateTime endDateTime;
}